const app = getApp();
Page({
  data: {
    ctaText: "立即预报名",
  },

  onLoad() {
    this.updateCtaTextByTime();
  },
  onShow() {},
  onReady() {},
  onHide() {},
  onUnload() {},
  onPullDownRefresh() {},
  onReachBottom() {},
  onShareAppMessage() {},
  updateCtaTextByTime() {
    // 活动开始时间：2025-09-26 18:00:00 (本地时间)
    const activityStart = new Date(2025, 8, 26, 18, 0, 0); // 月份从0开始，8代表9月
    const now = new Date();
    const started = now.getTime() >= activityStart.getTime();
    this.setData({ ctaText: started ? "立即参与" : "立即预报名" });
  },
  toWyMiniProgram(e) {
    wx.navigateToMiniProgram({
      appId: "wx2551ee586ff61304",
    });
  },
});

